package com.ws.mapper;

import com.ws.bean.Images;
import com.ws.bean.vo.ImageVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

public interface ImageMapper {
    @Insert("insert into images(route_id,image_url) values(#{route_id},#{image_url})")
    int add(Images images);

    ArrayList<Images> list(ImageVo imageVo);

    @Delete("delete from images where image_id=#{imageId}")
    int delete(Integer imageId);

    @Select("select image_url from images where route_id=#{routeId}")
    List<Images> listById(Integer routeId);
}
